/*
 * Copyright (c) 2011 Joe Kopena <tjkopena@gmail.com>
 *
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy,
 * modify, merge, publish, distribute, sublicense, and/or sell copies
 * of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
*/

package com.rocketshipgames.haxe;

import flash.display.BitmapData;

import com.rocketshipgames.haxe.Engine;
import com.rocketshipgames.haxe.gfx.Graphic;

class Entity {

  public var x:Float;
  public var y:Float;
  public var layer:Int;

  private var _graphic:Graphic;

  private var _parent:Engine;

  public function new(?graphic:Graphic=null, ?x_:Float=0, ?y_:Float=0):Void
  {
    if (graphic != null) {
      _graphic = graphic;
    }
    x = x_;
    y = y_;
    // end function new
  }

  public function setParent(p:Engine):Void
  {
    _parent = p;
    // end function setParent
  }

  public function update():Void
  {
    // end function update
  }

  public function render():Void
  {
    _graphic.render(x, y);
    // end function render
  }

  // end class Entity
}
